<template>
  <div class="app-navbar">
    <van-nav-bar
      :title="title"
      left-text="返回"
      left-arrow
      @click-left="handleBack"
    />
  </div>
</template>

<script>
export default {
  name: 'AppNavbar',
  methods: {
    handleBack() {
      // 编程式的导航：后退
      this.$router.back()
    },
  },
  computed: {
    title() {
      return this.$route.meta.title || '小卖部'
    },
  },
}
</script>

<style lang="less" scoped>

</style>
